package com.stlm2.dems.user.entity;

import com.stlm2.core.common.jdbc.dialect.SybaseDialect;

/**
 * Created by apple on 2017/5/23.
 */
public enum AccountState {

    Normal(1) {
        public String toString() {
            return "正常";
        }
    },
    Locked(2) {
        public String toString() {
            return "锁定";
        }
    };

    private final int val;

    AccountState(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static AccountState getByIntValue(int n) {
        switch (n) {
            case 1:
                return Normal;
            case 2:
                return Locked;
            default:
                return null;
        }
    }
    public  static  void  main(String args[]){
        System.out.println(Normal);

        System.out.println(Normal.getIntValue());

    }
}
